﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="MarkaIslemleri.aspx.cs" Inherits="BeniBastanYaratProject.Yonetim.MarkaIslemleri" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .bubbleInfo
        {
            position: relative;
        }
        
        .trigger
        {
            position: relative;
        }
        
        /* Bubble pop-up */
        
        .popup
        {
            position: absolute;
            display: none;
            z-index: 50;
            border-collapse: collapse;
            width: 218px;
            height: 240px;
            padding:10px;
            background-image:  url('../images/speech.png');
            background-repeat:no-repeat;
            
        }
    </style>
    <script src="../js/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {

            $('#yenimarkaekle').click(function () {


                $('#yenimarka').slideToggle('normal', function () { });

            });

            $('#yenimarka').slideToggle(0);



            $(function () {
                $('.bubbleInfo').each(function () {
                    var distance = 10;
                    var time = 250;
                    var hideDelay = 500;

                    var hideDelayTimer = null;

                    var beingShown = false;
                    var shown = false;
                    var trigger = $('.trigger', this);
                    var info = $('.popup', this).css('opacity', 0);


                    $([trigger.get(0), info.get(0)]).mouseover(function () {
                        if (hideDelayTimer) clearTimeout(hideDelayTimer);
                        if (beingShown || shown) {
                            // don't trigger the animation again
                            return;
                        } else {
                            // reset position of info box
                            beingShown = true;

                            info.css({
                                top: -240,
                                left: -68,
                                display: 'block'
                            }).animate({
                                top: '-=' + distance + 'px',
                                opacity: 1
                            }, time, 'swing', function () {
                                beingShown = false;
                                shown = true;
                            });
                        }

                        return false;
                    }).mouseout(function () {
                        if (hideDelayTimer) clearTimeout(hideDelayTimer);
                        hideDelayTimer = setTimeout(function () {
                            hideDelayTimer = null;
                            info.animate({
                                top: '-=' + distance + 'px',
                                opacity: 0
                            }, time, 'swing', function () {
                                shown = false;
                                info.css('display', 'none');
                            });

                        }, hideDelay);

                        return false;
                    });
                });
            });
        });

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Main_CenterContent" runat="server">
    <div>
    </div>
    <br />
    <div style="background-color: #F0F4F5; color: #32626D; font-weight: bold; font-size: 15px;
        text-align: center; padding: 10px; border: 1px solid #32626D;">
        Markalar</div>
    <br />
    <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="MarkaID"
            DataSourceID="SqlDataSource1" Width="596px" Height="154px" CellPadding="4" GridLines="None"
            ForeColor="#333333" >
            <AlternatingRowStyle BackColor="#F0F4F5" ForeColor="#284775" />
            <Columns>
                <asp:TemplateField HeaderText="Marka Firma Ad&#305;">
                    <ItemTemplate>
                       <%# Eval("MarkaFirmaAdi")%>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <Columns>
                <asp:TemplateField HeaderText="Marka Firma Yetkili">
                    <ItemTemplate>
                        <%# Eval("MarkaFirmaYetkili") %>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <Columns>
                <asp:TemplateField HeaderText="Marka Firma Telefon1">
                    <ItemTemplate>
                        <%# Eval("MarkaFirmaTelefon01") %>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <Columns>
                <asp:TemplateField ItemStyle-Width="40">
                    <ItemTemplate>
                        <span class="bubbleInfo">
                            <img class="trigger" src="../images/info-icon.png" alt="Düzenle" style="border: none;" />
                            <div class="popup">
                                <div style="font-size: 13px; font-weight: bold; color: #159DD3; text-align: center;
                                    margin: 2px; border: none;">
                                    <%# Eval("MarkaFirmaAdi")%></div>
                                <div>
                                    <div style="width: 60px; float: left; font-weight: bold; color: #159DD3;">
                                        Adres:
                                    </div>
                                    <div style="font-size: 11px; font-weight: normal; color: #F0F4F5; width: 140px; float: left;">
                                        <%# Eval("MarkaFirmaAdresi") %></div>
                                </div>
                                <div>
                                    <div style="width: 60px; float: left; font-weight: bold; color: #159DD3;">
                                        Yetkili:
                                    </div>
                                    <div style="font-size: 11px; font-weight: normal; color: #F0F4F5; width: 140px; float: left;">
                                        <%# Eval("MarkaFirmaYetkili") %></div>
                                </div>
                                <div>
                                    <div style="width: 60px; float: left; font-weight: bold; color: #159DD3;">
                                        Telefon1:
                                    </div>
                                    <div style="font-size: 11px; font-weight: normal; color: #F0F4F5; width: 140px; float: left;">
                                        <%# Eval("MarkaFirmaTelefon01") %></div>
                                </div>
                                <div>
                                    <div style="width: 60px; float: left; font-weight: bold; color: #159DD3;">
                                        Telefon2:
                                    </div>
                                    <div style="font-size: 11px; font-weight: normal; color: #F0F4F5; width: 140px; float: left;">
                                        <%# Eval("MarkaFirmaTelefon02") %></div>
                                </div>
                                <div>
                                    <div style="width: 60px; float: left; font-weight: bold; color: #159DD3;">
                                        Telefon3:
                                    </div>
                                    <div style="font-size: 11px; font-weight: normal; color: #F0F4F5; width: 140px; float: left;">
                                        <%# Eval("MarkaFirmaTelefon03") %></div>
                                </div>
                                <div>
                                    <div style="width: 60px; float: left; font-weight: bold; color: #159DD3;">
                                        Fax:
                                    </div>
                                    <div style="font-size: 11px; font-weight: normal; color: #F0F4F5; width: 140px; float: left;">
                                        <%# Eval("MarkaFirmaFax") %></div>
                                </div>
                                <div>
                                    <div style="width: 60px; float: left; font-weight: bold; color: #159DD3;">
                                        E-Posta:
                                    </div>
                                    <div style="font-size: 11px; font-weight: normal; color: #F0F4F5; width: 140px; float: left;">
                                        <%# Eval("MarkaFirmaEposta") %></div>
                                </div>
                                <div>
                                    <div style="width: 60px; float: left; font-weight: bold; color: #159DD3;">
                                        Not:
                                    </div>
                                    <div style="font-size: 11px; font-weight: normal; color: #F0F4F5; width: 140px; float: left;">
                                        <%# Eval("MarkaFirmaNot") %></div>
                                </div>
                            </div>
                        </span>
                        </div> </div> </div> </div>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <Columns>
                <asp:TemplateField HeaderText="&#304;&#351;lem">
                    <ItemTemplate>
                        <a href="MarkaDuzenle.aspx?mid=<%# Eval("MarkaID") %>">
                            <img src="../images/edit-icon.png" alt="Düzenle" style="border: none" /></a>
                    </ItemTemplate>
                </asp:TemplateField>

            </Columns>
             <Columns> 
              
        <asp:TemplateField HeaderText="&#304;&#351;lem">
                    <ItemTemplate>
                      <asp:ImageButton ID="ImageButton1" runat="server" CommandName="delete" 
        ImageUrl="~/images/Error-icon.png" onclick="ImageButton1_Click" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" ForeColor="#159DD3" Font-Bold="True" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1"  runat="server" ConnectionString="<%$ ConnectionStrings:BeniBastanYaratDBConnectionString %>"
            SelectCommand="SELECT [MarkaID], [MarkaFirmaAdi], [MarkaFirmaAdresi], [MarkaFirmaYetkili], [MarkaFirmaTelefon01], [MarkaFirmaEposta], [MarkaFirmaTelefon02], [MarkaFirmaTelefon03], [MarkaFirmaFax], [MarkaFirmaNot] FROM [Markalar]">
        </asp:SqlDataSource>
    </div>
    <div>
    </div>
   
    <div id="yenimarkaekle" style="border: 1px solid #CCCCCC; cursor: pointer; padding: 2px;
        background-color: #Fafafa; margin-top: 10px; width: 120px; float: right; text-align: center;
        font-weight: bold;">
        Yeni Marka Ekle
    </div>
     <div style="clear:both;"></div>
    <div id="yenimarka">
        <div style="background-color: #F0F4F5; color: #32626D; font-weight: bold; font-size: 15px;
            text-align: center; padding: 10px; border: 1px solid #32626D; margin-top:10px;">
            Yeni Marka Olu&#351;tur</div>
        <table class="style1">
            <tr>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style3">
                    Marka Firma Ad&#305; :
                </td>
                <td>
                    <asp:TextBox ID="txtFirmaAdi" runat="server" Width="270px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    Marka Firma Adresi :
                </td>
                <td>
                    <asp:TextBox ID="txtFirmaAdresi" runat="server" Width="270px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    Marka F&#304;rma Yetkili : &nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtFirmaYetkili" runat="server" Width="270px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    Marka Firma Telefon1 :
                </td>
                <td>
                    <asp:TextBox ID="txtFirmaTel" runat="server" Width="270px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    Marka Firma Telefon2 :
                </td>
                <td>
                    <asp:TextBox ID="txtFirmaTel2" runat="server" Width="270px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    Marka Firma Telefon3 :
                </td>
                <td>
                    <asp:TextBox ID="txtFirmaTel3" runat="server" Width="270px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    Marka F&#304;rma Fax :
                </td>
                <td>
                    <asp:TextBox ID="txtFirmaFax" runat="server" Width="270px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    Marka Firma E-Posta :
                </td>
                <td>
                    <asp:TextBox ID="txtFirmaEposta" runat="server" Width="270px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3" valign="top">
                    Marka Firma Not :
                </td>
                <td>
                    <asp:TextBox ID="txtFirmaNot" runat="server" Height="117px" Width="228px" 
                        TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnKaydet" runat="server" Text="Yeni Marka Kaydet" Width="168px"
                        Font-Bold="True" OnClick="Button1_Click" />
                </td>
            </tr>
        </table>
    </div>
    
</asp:Content>
